#include <stdio.h>
#include "nuclei_sdk_hal.h"

int main(){

   printf("timer reset start\r\n");
   if(REG32(0xE0000000) & (0x1 << 18)){
       printf("this is timer soft reset\r\n");
	REG32(0xE0000000) |= 0x1<<15;
	if(REG32(0xE0000000) & (0x1 << 18)){
		printf("clear timer soft reset flag fail\r\n");
	}else{
		printf("clear timer soft reset flag pass\r\n");
	#ifdef CFG_SIMULATION
        pass_fail_simulation(1);
        #endif 
	}

       while(1);
   }


    SysTimer->MSFTRST = 0x80000a5f;


}
